﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebInstagram.Models;

namespace WebInstagram.DAL
{
    public class PhotosRep : Repository<Photo>
    {
        public List<Photo> GetUserPhotos(string user)
        {
            var photos = Table.Where(p => p.User == user).OrderByDescending(p => p.Created).ToList();
            return photos;
        }
    }
}